<?php
    
    // for($i = 1; $i <= 100; $i++){
    //     echo $i."<br>";
    // }

    // foreach  变量数组和对象
    // foreach( $array as $value ){}
    // foreach( $array as $key => $value ){}

    // $arr = [1,4,7,2,5,8,3,6,9];
    // foreach( $arr as $val ){  // 遍历数组 返回数组的值
    //     echo $val."<br>";
    // }

    $arr = [1,4,7,2,5,8,3,6,9];
    foreach( $arr as $key => $val ){  // 遍历数组 返回数组的键(下标)和值
        echo $key.":".$val."<br>";
    }

